<template>
  <div class="dashboard-container">
    <!-- 总访问量 -->
    <div class="data-card">
      <div class="content-row">
        <div class="label">总访问量</div>
        <div class="number-sequence">
          <div class="digit">1</div>
          <div class="digit">2</div>
          <div class="digit">3</div>
          <div class="digit">4</div>
          <div class="digit">5</div>
          <div class="digit">8</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'TotalVisits'
}
</script>

<style scoped>
.dashboard-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;

  color: white;
  min-height: auto;
  width: 100%;
}

.data-card {

  border-radius: 4px;
  padding: 6px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 300px;
}

.content-row {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 4px 0;
}

.label {
  font-size: 16px;
  color: #ffffff;
  font-weight: bold;
  margin: 0;
  white-space: nowrap;
  margin-right: 10px;
}

.number-sequence {
  display: flex;
  justify-content: center;
  gap: 0;
  flex: 1;
}

.digit {
  width: 36px;
  height: 36px;
  background: #2d5749;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: #d5f88f;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  /* 添加右边框来分隔数字 */
  border-right: 1px solid #006600;
}

/* 移除最后一个数字的右边框 */
.digit:last-child {
  border-right: none;
}

.digit:hover {
  transform: scale(1.05);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 4px;
  }
  
  .data-card {
    padding: 4px 12px;
    max-width: 100%;
  }
  
  .content-row {
    gap: 0;
  }
  
  .label {
    font-size: 14px;
    margin-right: 8px;
  }
  
  .digit {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}
</style>